<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例11</title>
    <script src="jquery.js"></script>
    <script>
        $(function (){
            console.log($("#a").parent().parent())
            console.log($("#a").parents(".two"))
        })
    </script>
</head>
<body>
    <h2>热门动画排行</h2>
    <div class="one">
        <div class="two">
            <ul>
                <li>名侦探柯南</li>
                <li id="a">阿拉蕾</li>
                <li>海贼王</li>
            </ul>
        </div>
    </div>
    <div class="one">
        <div class="two">
            <ul>
                <li>名侦探柯南</li>
                <li id="b">阿拉蕾</li>
                <li>海贼王</li>
            </ul>
        </div>
    </div>
</body>
</html>